package com.ncp.servlet.index;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.ncp.model.biz.index.FootManager;

public class FootClServlet extends HttpServlet {

	public void doPost(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		response.setContentType("text/html");
		PrintWriter out = response.getWriter();
		String address=request.getParameter("address");
		String telephone=request.getParameter("telephone");
		String fax=request.getParameter("fax");
		boolean b=new FootManager().updateFoot(address,telephone,fax);
		if(b){
			request.setAttribute("url", "pages/admin/footCl.jsp");
			request.getRequestDispatcher("pages/admin/operateOK.jsp").forward(request, response);
		}
	}

	public void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		response.setContentType("text/html");
		PrintWriter out = response.getWriter();
		this.doPost(request, response);
	}

}
